﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Excel = Microsoft.Office.Interop.Excel;

namespace ExcelReport
{
    class program
    {

        static void Main(string[] Args)
        {
            String line;
            string[] parts;
            char[] delimiters = new char[] { '\t' };

            using (StreamReader sr = new StreamReader("../../../DataBase/graphs.txt"))
            {
                line = sr.ReadLine();
                parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                // damage
                if (Convert.ToInt16(parts[2]) == 1)
                {
                    DamageReport dmgr = new DamageReport();
                    dmgr.algoTotalDamage(parts[1]);
                }

                line = sr.ReadLine();
                parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                // utilization
                if (Convert.ToInt16(parts[1]) == 1)
                {
                    DeviceReport drUtil = new DeviceReport();
                    for (int i = 1; i < 4; i++)
                        drUtil.DeviceUtilization(i);
                }

                line = sr.ReadLine();
                parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                // response time
                if (Convert.ToInt16(parts[1]) == 1)
                {
                    ResponseTimeReport rtr = new ResponseTimeReport();
                    rtr.RTReport();
                }

                line = sr.ReadLine();
                parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                // lun priority
                if (Convert.ToInt16(parts[1]) == 1)
                {
                    LunPriorityReport lp = new LunPriorityReport();
                    lp.PriorityReport(10.0);
                }

                line = sr.ReadLine();
                parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
                // extent division
                if (Convert.ToInt16(parts[1]) == 1)
                {
                    DeviceReport drDivis = new DeviceReport();
                    for (int i = 1; i < 4; i++)
                    {
                        drDivis.DivisionPriorityGroup(i, "First");
                        drDivis.DivisionPriorityGroup(i, "Second");
                        drDivis.DivisionPriorityGroup(i, "Third");
                    }
                }
            }

            Console.WriteLine("The End");
            Console.ReadLine();
        }

    }
}